package exam.service.impl;


import exam.bean.PatentType;
import exam.dao.PatentTypeDao;
import exam.service.IPatentTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PatentTypeServiceImpl implements IPatentTypeService {
    @Autowired
    PatentTypeDao patentTypeDao;
    @Override
    public List<PatentType> getPatentTypeList() {
        return patentTypeDao.getPatentTypeList(null);
    }

    @Override
    public int insertInfo(PatentType patentType) {
        return patentTypeDao.insertInfo(patentType);
    }

    @Override
    public int deleteInfo(int id) {
        return patentTypeDao.deleteInfo(id);
    }

    @Override
    public int updateInfo(PatentType patentType) {
        return patentTypeDao.updateInfo(patentType);
    }

    @Override
    public PatentType selectInfoSingle(Map<String, Object> map) {
        return patentTypeDao.getPatentTypeList(map).get(0);
    }
}
